
package com.eascs.web.o2o.scheduler.test;

import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.site.controller.BaseRestController;
import com.eascs.web.o2o.scheduler.service.SynchroWorkflow;
import com.eascs.web.o2o.scheduler.task.WorkFlowSynchroTask;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.inject.Inject;


@RestController
public class WorkflowController extends BaseRestController {
	protected final Logger logger = LoggerFactory.getLogger(getClass());

	@Inject
	WorkFlowSynchroTask workFlowTask;

	@Inject
	SynchroWorkflow synchroWorkflow;
	
	@RequestMapping(value = "/o2o/scheduler/workflow/warnEmail")
	public void wfWorkWarnEmail() {
		workFlowTask.wfWorkWarnEmail();
	}

	@RequestMapping(value = "/o2o/scheduler/workflow/timeffective1")
	public void timeffective1() {
		workFlowTask.timeffective();
	}

	@RequestMapping(value = "/o2o/scheduler/workflow/timeffective2")
	public void timeffective2() {
		workFlowTask.timeffective2();
	}
	
	
	@RequestMapping(value = "/o2o/scheduler/workflow/timeffective3")
	public void timeffective3() {
		workFlowTask.timeffective3();
	}
	@RequestMapping(value = "/o2o/scheduler/workflow/timeffective4")
	public void timeffective4() {
		workFlowTask.timeffective4();
	}
	@RequestMapping(value = "/o2o/scheduler/workflow/timeffective5")
	public void timeffective5() {
		workFlowTask.timeffective5();
	}
	@RequestMapping(value = "/o2o/scheduler/workflow/timeffective6")
	public void timeffective6() {
		workFlowTask.timeffective6();
	}

	
	/**
	 * 同步workflow组织架构表（手动触发一次）
	 * 
	 * 2016年6月14日
	 */
	// @RequestMapping(value = "/o2o/scheduler/workflow/org/synch")
	public void workflowOrg() {
		synchroWorkflow.saveOrgan();
	}

	/**
	 * 同步workflow hr_*表
	 * 
	 * 2016年6月14日
	 */
	@RequestMapping(value = "/o2o/scheduler/workflow/hr/synch")
	public void workflowHR() {
		synchroWorkflow.saveEmployee();
	}

}